from django.conf.urls import patterns, url
from forum.models import UserAct 

urlpatterns = patterns('forum.views',
        url(r'^$', 'index'), 

        url(r'^article/(?P<article_id>\d+)/$', 'article_detail'), 
        url(r'^latest/(?P<page_num>\d+)/$', 'latest_articles'), 

        url(r'^list/(?P<board_id>\d+)/(?P<page_num>\d+)/$', 'article_list'), 
        url(r'^add/$', 'add_article'), 

        url(r'^comment/(?P<article_id>\d+)/$', 'comment'), 
        url(r'^zan/(?P<article_id>\d+)/$', 'user_act', {'act': UserAct.ACT_ZAN}), 
        url(r'^save/(?P<article_id>\d+)/$', 'user_act', {'act': UserAct.ACT_SAVE}), 

        url(r'^upload/$', 'upload_image' ), 
)

